import time

from selenium.webdriver.common.by import By
from yuekao.Base.Base import Base
class Page(Base):

    # 搜索框
    search_loc=(By.ID,'chat-textarea')
    # 点击搜索
    searchbtn_loc=(By.ID,'chat-submit-button')

    def search(self):
        self.send_keys(self.search_loc,'我喜欢软件测试')

    def searchbtn(self):
        self.click(self.searchbtn_loc)

    def luoji(self):
        self.open_url('https://www.baidu.com')
        print('self.search()')
        assert '我喜欢软件测试' == self.search()
        self.searchbtn()
        # 强制等待
        time.sleep(10)


